package com.monitor.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.List;

@TableName("erp_powers")
public class ErpPowers extends Model<ErpPowers>{

    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 权限名称
     */
    @TableField("name")
    private  String name;
    /**
     * 上级id
     */
    private  Integer pid;

    private transient List<ErpPowers> erpPowersList;

    public List<ErpPowers> getErpPowersList() {
        return erpPowersList;
    }

    public void setErpPowersList(List<ErpPowers> erpPowersList) {
        this.erpPowersList = erpPowersList;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
